<!-- /* Description for file.
 * 面试记录-增加
 *
 * @copyright     Copyright 2008-2010, PHInfo Services Inc. (http://www.phinfoservices.com)
 * @package       ues
 * @subpackage    ues/app/views/feepaystyles
 * @since         ues
 * @version       V0.0.1
 * @modifiedby    张海杰2011年0708
 * @lastmodified  张海杰2011年0708
 */-->
 
<?php
echo $html->css ( 'style' );
//echo $javascript->link ( 'jquery' );
echo $javascript->link ( 'formValidate' );
?>
<script language="javascript">
var flag=true;
</script>
<script language="javascript">
var projectmanagementid="<?php echo $data['Candidate']['projectmanagement_id'];?>";
</script>

<script type="text/javascript">

//添加验证
$(document).ready(function() {

	//验证是否必填
	function test(id)
	{
		var srt = "font#" + id;
		var isValidate =  $(srt).text();
		var validate = $.trim(isValidate);
		if(validate == "*"){
			return true;
		} else {
			return false;
		}
	}

	$.validator.setDefaults({       
		 submitHandler: function(form) {  
		  form.submit();    
		}       
	});   
			
// validate signup form on keyup and submit
$("#InterviewrecordEditForm").validate({ 
rules: {
"data[Interviewrecord][interviewtime]"  : {
required: test("interviewtime"),string:true,stringMinLength:0,stringMaxLength:50
},//面试时间
"data[Interviewrecord][interviewaddress]"  : {
required: test("interviewaddress"),string:true,stringMinLength:0,stringMaxLength:50
},//面试地点
"data[Interviewrecord][interviewfeedback]"  : {
required: test("interviewfeedback"),string:true,stringMinLength:0,stringMaxLength:50
},//客户反馈
"data[Interviewrecord][memo]"  : {
required: test("memo"),string:true,stringMinLength:0,stringMaxLength:50
},//面试备注
"data[Interviewrecord][interviewasker]"  : {
required: test("interviewasker"),string:true,stringMinLength:0,stringMaxLength:50
},//面试官
							
"data[Interviewrecord][projectCode]" : {
required: false,string:true,stringMinLength:0,stringMaxLength:50
},
"data[Interviewrecord][warnbefore]" : {
required: false,digits:true
},
"data[Interviewrecord][spacewarn]" : {
required: false,digits:true
}
},

focusInvalid:false,
onkeyup:false,
errorPlacement:function(error, element){
	error.appendTo(element.parent());
}
});
});
</script>

<script type="text/javascript">
  var message="<?php echo $message;?>";
  if(message!="")
  {
	window.opener.tablereload(message);
	window.opener.opener.location.reload();
 	window.close();
  }
</script>
<!-- 当前位置-->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Projectmanagements');//一级目录
										  echo '>';echo "项目进度管理";//三级目录
										   echo '>';echo "面试管理";
										   echo '>';?>
									<?php echo $html->tag('span', __('Interview Edit',true));//当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->

<div class="tabflex">
<fieldset><legend><?php echo __('Interviewrecord add')?></legend>
<?php echo $form->create('Interviewrecord',array('action'=>'edit',"onsubmit"=>""));?>
<?php echo $form->hidden('table',array('id'=>'table','default'=>$table));?>	
<?php echo $form->hidden('projectmanagement_id',array('default'=>$data['Candidate']['projectmanagement_id']));?>	
<?php echo $form->hidden('candidate_id',array('default'=>$data['Candidate']['id']));?>
<?php echo $form->hidden('id',array('default'=>$data['Candidate']['interviewrecord_id']));?>
<?php echo $form->hidden('scheduleid',array('default'=>$data['Interviewrecord']['scheduleid']));?>		
<?php echo $form->hidden('resume',array('default'=>$data['Resume']['name']));?>	
<table width="100%" cellspacing="0" cellpadding="0" border="0"
	style="text-align: left">
		<tr>
		<td width="50"></td>
		<td width="100">项目编号:</td>
		<td>
		<?php 
			echo $form->input('projectCode',array('label'=>false,'disabled'=>true,'default'=>$data['Projectmanagement']['projectCode']));
		?>
		</td>
		<td width="100">面试轮次:</td>
		<td>
		<?php 
			echo $form->input('interviewturn',array('options'=>$op2,'label'=>false,'class' => 'TextBoxE0','default'=>$data['Interviewrecord']['interviewturn']));
		?>
		</td>
		</tr>
		
		<tr>
		<td width="50"></td>
		<td width="100">候选人名:</td>
		<td>
		<?php 
			echo $form->input('Resume.name',array('label'=>false,'disabled'=>true,'default'=>$data['Resume']['name']));
		?>
		</td>
		<td width="100">面试职位:</td>
		<td>
		<?php 
			echo $form->input('projectCode',array('label'=>false,'disabled'=>true,'default'=>$data['Projectmanagement']['projectCompanyPosition']));
		?>
		</td>
		</tr>
		
		<tr>
		<td width="50"></td>
		<td width="100">面试官:
			<font color="red" id="interviewasker">
				<?php if($fields['interviewasker'] == 1 && $fields['interviewasker'] !=null){echo "*";}?>
			</font>	
		</td>
		<td>
		<?php 
			echo $form->input('interviewasker',array('id'=>'interviewrecordsinterviewasker','options'=>$user,'label'=>false,'class' => 'TextBoxE0','default'=>$data['Interviewrecord']['interviewasker']));
		?>
		</td>
		<td width="100">选择试卷:</td>
		<td>
		<?php 
			echo $form->input('interviewquestionname',array('options'=>$interviewquestion,'label'=>false,'class' => 'TextBoxE0','default'=>$data['Interviewrecord']['interviewquestionname']));
		?>
		</td>
		</tr>
		
		<tr>
		<td width="50"></td>
		<td width="100">面试时间:
			<font color="red" id="interviewtime">
				<?php if($fields['interviewtime'] == 1 && $fields['interviewtime'] !=null){echo "*";}?>
			</font>	
		</td>
		<td>
		<?php 
			echo $form->input('interviewtime',array('id'=>'interviewrecordsinterviewtime','label'=>false,'dateFormat'=>'YMD','monthNames' => false, 'timeFormat'=> '24','div'=>false,'selected'=>$data['Interviewrecord']['interviewtime']));
		?>
		</td>
		</tr>
		<tr>
		<td width="50"></td>
		<td width="100">提前提醒:</td>
		<td>
		<?php 
			echo $form->input('warnbefore',array('label'=>false,'div'=>false,'default'=>$data['Interviewrecord']['warnbefore']));
		?>&nbsp;&nbsp;天
		</td>
		
		<td width="100">间隔提醒:</td>
		<td>
		<?php 
			echo $form->input('spacewarn',array('label'=>false,'div'=>false,'default'=>$data['Interviewrecord']['spacewarn']));
		?>&nbsp;&nbsp;分
		</td>
		</tr>
		<tr>
		<td width="50"></td>
		<td width="100">面试地点:
			<font color="red" id="interviewaddress">
				<?php if($fields['interviewaddress'] == 1 && $fields['interviewaddress'] !=null){echo "*";}?>
			</font>	
		</td>
		<td>
		<?php 
			echo $form->input('interviewaddress',array('id'=>'interviewrecordsinterviewaddress','label'=>false,'id'=>'projectmanagementsprojectCode','default'=>$data['Interviewrecord']['interviewaddress']));
		?>
		</td>
		</tr>
		<tr>
		<td width="50"></td>
		<td width="100" style="vertical-align:top;">客户意见:
			<font color="red" id="interviewfeedback">
				<?php if($fields['interviewfeedback'] == 1 && $fields['interviewfeedback'] !=null){echo "*";}?>
			</font>	
		</td>
		<td colspan="3">
		<?php 
			echo $form->textarea('interviewfeedback',array('id'=>'interviewrecordsinterviewfeedback','label'=>false,'id'=>'projectmanagementsmemo','class' => 'TextArea1 txtOut','default'=>$data['Interviewrecord']['interviewfeedback']));
		?>
		</td>
		</tr>
		<tr>
		<td width="50"></td>
		<td width="100" style="vertical-align:top;">面试备注:
			<font color="red" id="memo">
				<?php if($fields['memo'] == 1 && $fields['memo'] !=null){echo "*";}?>
			</font>	
		</td>
		<td colspan="3">
		<?php 
			echo $form->textarea('memo',array('id'=>'interviewrecordsmemo','label'=>false,'id'=>'projectmanagementsmemo','class' => 'TextArea1 txtOut','default'=>$data['Interviewrecord']['memo']));
		?>
		</td>
		</tr>
</table>
</fieldset>
</div>
<table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: left">
	<tr>
		<td width="50"></td>
		<td width="100"><?php echo $form->button('确定',array('type'=>'submit','class'=>'oksubmit'));?>  <!-- __('reset', true)取消-->
		<td width="100"><?php echo $form->button('重置',array('type'=>'reset','class'=>'oksubmit'));?>  <!-- __('reset', true)取消-->
		</td>
	</tr>
</table>
<?php echo $form->end();?>